The present invention relates to a computer system and, more particularly, to an application programming interface that allows the temporary release of file locks and notifications that are associated with a monitored volume.
In existing operating systems, it is oftentimes the case that a particular storage volume (such as a file or folder) when opened, is also monitored by a subsystem or client of the operating system. More specifically, the opened volume results in the subsystem setting up a number of notification handles (xe2x80x9cnotificationsxe2x80x9d) so that the monitoring subsystem can tell if the volume is transferred, added to, deleted, renamed, or changed in size. In the past, this act of monitoring the volume for changes resulted in the inability of a user to use any of the drives that comprised the volume. For instance, it was not possible to format the volume or remove the by volume from the system.
A particular example of the above situation involves the shell of an operating system. It is now common for operating systems to have a shell which provides a system user interface. The shell is a piece of software (either a separate program or a component of the operating system) that provides direct communication between the user and the operating system. Oftentimes, a storage volume is displayed by the shell via the system user interface. The very act of having the shell display the volume requires that the shell monitor the volume for changes to, additions to, or deletions of the files present. This monitoring prevents the operating system or client process from acting on the displayed volume. It has been found that there is often a desire on the part of users to perform certain actions, such as formatting, on the storage volume. It is inconvenient and nonsensical not to allow a user to perform operations on the storage volume simply because the user is currently viewing it via the user interface.
Accordingly, there is a need for an effective system and method for allowing a user to modify a volume that is being monitored by some other system or client of an operating system. A system and method which allows such changes to an open volume without interfering with the monitoring functions of the monitoring subsystem or clients of the operating system is also needed.
Accordingly, the present invention provides for a method of performing an action on a storage volume that is being monitored by another program. More specifically, the method includes issuing of a command to suspend the notification handles that are associated with the storage volume and that were set up by the monitoring program. Thereafter, the inventive method suspends the notification handles associated with the storage volume. After the notifications have been suspended, the action can be performed on the storage volume. After the action has been performed on the storage volume, a command is issued to resume or re-institute the notification handles associated with the storage volume. Thereafter, all of the notification handles associated with the storage volume are re-instituted and the monitoring of the storage volume is again active.
The method according to the present invention further includes the enumeration of all volumes that are being monitored prior to suspending the notifications associated with the storage volume. Additionally, if the change made to the storage volume is of a substantial nature, such that the monitoring program should be informed, an indication is made to the monitoring program that a substantial change has been made.
Additional advantages and novel features will be set forth in the description which follows and in part may become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention.